removed some code from controllers