use correct promises syntax