Added very basic promise functionality