added userdata func