added debugging mechanic