add algorithm documentation