Use return value of result function to indicate to proceed or not