putting models into templates