refactor load layer