code to generate meta