Working using lines and custom datatemplate