drastically improved lighting code