added the command pattern