extend button code for regular buttons