removed allocTypeArrayFromClassName in favour of putting it in other branch