Added .trim() to the input serialnumber, avoiding error of blank spaces