Refactored the code and returned some strings for the results