modified newcommand to def