added portToken function to router