added logic to handle weird medic numbering