moved logic to separate controller and updated other dependent bits