refactored controller parser