modified the initialSchema function to add arraylist as new object. Otherwise it will be changed by the end of the function