add lines functionality implemented