Change layers to instance variable