wrap call back function in $timeout