started path compressing code