problems with typecast, transforms in arraylist