added the basic promises implementation