path matching first version