maybe I shouldn't cast to an array