remove unnecessary containsKey