updated code to work with the new one-folder-per-model system