document details of algorithm