fix declarations
manage file sharing with tokens