added documentation for promise functions