added serializable check