Using Promise.cast() instead of new Promise()