improved formatting
added some docs