handling of error added