add algorithm test codes