add reshape2 where necessary and refine readme