constant updating in controller

controller now updating using $intervale