testing and fixed bugs.