adding functions and fields for debugging stuff