add algorithm written by python