nicer way to display errors