add logic to get names, partially implemented