Proper mapmatching script