Replaced the Console.Writelines with the helper method.