added controller implementation