refactor done for this case