modify line counting script