use getType within serialise