added serial read code