fixed controller's constructor