removing async and using promoises