optimized serialization by reduced objects casting into one helper variable