modify js to bind click to  buttons