safer coding of router toplevel