register events if new layer is added