Improved instance generator