cleaning up cmd args code