added exception catching to todo list