reorganized code in main. added todo list