added to serial.js as well