functionality given to all buttons