move setup code to setup()