use the parseDirections function