added back in serial processign code