exctracted token and timestamp into methods