made array sparse to save memory