Dictionary Generator with custom callback functionality