re-added serial printouts for debugging