handle binding button events a bit better