make setup a function