add listener function to Lights class