Add set properties function