refactor: config.go and added test