add helper method to extract a repeated method, clean up user model
resolve merge conflict