refactoring local layers for the new API
flake8