made the initialiation process promise based