move config reading to config.go