added type control for controller