Use then instead of done for future compatibility with es6 promises