An electrosurgical system for sealing tissue is disclosed which includes an electrosurgical forceps having a shaft member and a jaw member disposed at a distal end thereof. The jaw members are movable from a first position in spaced relation relative to one another to at least one subsequent position wherein the jaw members cooperate to grasp tissue therebetween. Each of the jaw members including a sealing plate which communicates electrosurgical energy through tissue held therebetween. The jaw members are adapted to connect to an electrosurgical generator.; The system also includes one or more sensors which determine a gap distance between the sealing plates of the jaw members and a microprocessor which is adapted to communicate with the sensor and measure an initial gap distance between the sealing plates as well as to generate a desired gap distance trajectory based on the initial gap distance. The microprocessor is further adapted to communicate with the at least one sensor in real time to adjust output level of the electrosurgical generator as a function of the measured gap distance during the sealing process.