add algorithm code to project