move token and timestamp to helpers file