moved functions
fixed merge conflict
moved funcs to mycloudlib.c