tidied errors and output