handling new instance creation