Modified main function to use forward pipe operator