Added documentation for promises