implemented pathType based on two following frames