re-arranged some setup