added sum funtionality in js, but validation broke