Total engineering of heat sealers and tying machines with adhesive tapes or plastic ties to seal at the top of plastic bags. For example, fan-top shaped bags are achieved fan shape folding and tying at the same time.