update getByteSize method