open stack function