Passed Test and refactor