updated tests, fixed small bug