moved ud to api, old method wasnt working, based on cloudbots implementation of the api