fixing vector mapping script to work with data