put the getaddress functions in the window scope