version with serializable objects