Moved Serial reading to own function