working on documentation and fixed minor bugs