remove interval and make it a timeout function.