refactored tests

removed redundancy in tests