added vdie function