a couple minor algorithms written in python from last year