Added support for multiple instances