done with generic array