need to address Shlemeil the painter's algorithm in readlines
countlineSync function created. need to create async countline function