Working on dynamic creation of instances