now works having multiple instances