code changes

changes made to code and level test added.