reading the locs as well
refactor