add userdata support