rearranged steps since OS X needs to run last