refactored functions test into discrete tests