added some router code