changed router code + comments