replaced repetitive event registration code with event delegation