extracted setting of canvas listeners to separate method