add error check to setup