add user_data pointer to callback mechanism