added support for multipe instances
merge