add listeners at buttons