make $locations a hash