added unit test for less spaces than head list item
improved coverage
removed uncalled code