uses promise in bin