addes events for image