afterLoad refactoring