changed vector to map