Refactoring hardcoded output, fixing failed test