changes to make tests work with async