this is sample code. i created it during a class on algorithms.