changed contains() to containsKey()