use pattern instead of pure number to find new line