deleted redundant tests
Refactored code