- Updated to use promises