added debugging prints