Added generator code