testing for error