Added some serial code for debugging