cosmetics and error management