removed doubly declared registerCommand() method