refactored tests syntax
refactored code