small changes to setup function