don't allocate unnecessary memory to convert to array