refactor sshc script