fixed bug in create_data