Debugging prints added.