remove key val pair snippet