finished new set function