Refactor return type