switching from key value to data