algorithm with weights applied for metr.spr