fixed set function