moved the lights delegate into new file