layer creation and  update