fixed errors added test file