The Magic of Opening and Closing Gates and its Application page 2 full