added constructor in controller