add docs, XXX and TODOs