refactored loading custom models