assert replaced with if then error.