updated testing suite and fixed bugs