move filter to the end of xpath