modularizing code and beginning serial read and multi processing