bunch of classic algorithms