added logic for dynamic port input; default to 80