tests are happy, but shoud use promises