model frame base code