bug fix for itml and write some specs