added attr_accessible :key