added a couple of algorithms