added opening function