added iid gaussian code