hash calculation based on serialized values