Added function to generate values