add algorithm test