Writing Event handling in a more efficient way

Writing Event handling in a more efficient way