algorithm v0.2

minor bug fixes