adding static serialization interface to gather byte sizes of subclasses