Not finished update of setup function