somewhat successful debugging