refactor User model and view