cleanup of unnecessary arrays