add error conditions