Updated data creation code