changed functionality of controller