better line check