added 2 parameters for create_instance