modify formatResults() to take advantage of ArrayAccess implementation