added function to return back to user interface after adding product and managed the validation errors