added serial output for debugging