introduce IceCream class, add main function, restructure the parse function