circulation function