better error management
spacing fixes