added error messages for non numeric values or 0
cleaned up layout by adding error function, and return command