added some number theory routines, i think