Added setup function for controllers