reduced js for buttons