fixed the pointer issue with using gorm, be careful...