added handling for messages/errors
raise an error if width is too large