algorithm implemented v0.1 bugs eliminated