moved connecting to own method
added support for --port option
Merge pull request #8 from voda/port

added support for --port option