added casting to an array