some part of algorithm written