to check for correct token