fix update layer via api
refactoring