figured out casting issue