update code for advanced set