refactored test with describe blocks around methods