create records and handling in GORM