added a test class and changed some things