router optimization, better optional params support