generate message dynamically