added event listener for change on input for battle