made new generic algorithms