fixed minor bugs
updated tests