added event listeners with buttons that makes the changes