Development of environmentally friendly multifunctional flame retardants for commodity and engineering plastics