added Command Pattern