added some error messages to the ADT functions