more idiomatic promise usage
fix test