implemented the two button click thing