added code to replace username with displayname