better yet, just store the styles in a hash table, making this function into just:

    @styles[port] = style