re-factoring base.go