Refactoring callback of loadmodel