move restbase to .go file