add abstract algorithm