added some doc and TODOs