changed owner and token to global variables