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