added debugging class & functions