Replaced $timeout with $interval