added argument check to hg