switch from maps to slices