add lines functionality