improvement of code and update todo
bug corrections