made jpromise strict mode compatable