refactored, added second test