refactored controller methods