remove unnecessary keys