found better way to serialize arrays to json
encapsulated serialization of ArrayList<model> inside model file itself