added some comments and TODOs