cosmetics and debug cout deleted