Synthesis and characterization of polyamide-imides