Synthesis, characterization and biological studies of some medicinally important nitrogen containing heterocyclic compounds