The present teachings contemplate a method that includes a step of providing a first amount of esterified reaction product of an acid and an epoxy-based material. The esterified reaction product may be further reacted an epoxy resin to form a polymeric epoxy. The resulting material may have a generally linear backbone, foaming and curing capability and flame retardant properties.