handle generation automatically