adding command pattern