Open / close statement functionality

Open / close statement functionality