graphs – stCon algorithm to find 2 distinct edges between vertices

The traditional approach of stCon shows that there is a edge between two vertices in a graph and this problem can be solved on a TM by a non deterministic algorithm like this:
$<G,u,v>, G = (V,E)$ is a graph with the nodes $V={1,2,…,m}$

x := u
repeat m-times:
    if x == v:
        accept
    pick non-deterministic y from V
    if (x,y) element of E:
        x := y
        otherwise reject
    reject

If I want to check if there are two distinct edges to connect two vertices, I need to basically do the same but check if the paths that were found contain different vertices right? So how can one change this algorithm to accomplish that?