declare the global variable

declare some functions