testing and fixed bugs