add algorithms did before