add first version of auto generation hook