improve router validation