make last button clicked effective button