refactored to alloz multiple key setting