Recent developments in flame retarding thermoplastics and thermosets