refactor get names/all to use promises