format results, make it promise based