cleaned up register.go