some more algorithms