make touser/todata type-safe.