added invalidparameterexception class
updated path matcher to reduce complexity