wrapped vette in factory function to work in AMD or browser