the very start of serialize