added getLength method to ArrayType
fixed return types