restore add.go from master