Refactor to be more readable