Revert "Algorithm rev1"

This reverts commit e6b33dfa085e2218e4d5407e16f553466600c886.