check added for total sum, before passing the data to the server