Refactoring user_patch