Simplified getName function