AMD module for promise