added addcommand and nilcommand class