add aglorithm