Revert "Revert "Implemented Algorithm""

This reverts commit 61aa3f827db2524e25ac1caf3171def52cbd7909.