added canExecute function to command interface