Reconstructing the flux-rope topology using the FOTE method