made port more dynamic