converted tests to promises