fixed controller implementation