fixed minor bugs and added minor features