cmd signup factor out