patrolling algorithm developed during my FRI course