adds command functionality