Refactor each function to return the result, removed echo from the function