prepararation for button events