added useful debug statements