Changed #RETURN to #CONTINUE, abstracted out the continuation part a bit