dictionary removeKeysNotInArray method added