added command pattern example