Synthesis and biological activity studies of some nitrogen, oxygen and sulphur containing heterocyclic compounds