inner classes are now working
added checkcast when returning array from mult