Updated generating script