complex model building and loading