implemented line count functions