refactored current_user method