1.1. Attach events to the elements