Synthesis and biological activities of new phthalimide and thiazolidine derivatives