Spectral characteristics of bisthiophenes and terthiophenes linked with heterocyclic unit in solution and polymer matrix