refactored tests so they would work