added token check