use $timeout instead of $interval to iterate through the posts