make the core algorithm function