had to make classes serializable