optimizing joinModels