made ports more dinamically