fixed minor bugs and added challenge tests