added support for ports and env variables