addded error messages