variables token and a few functions added