moved models to template for f/b api