Add code for setup loop