Seperate out set function.

basically more refactoring to test in IEs...