check if token exists first