added command pattern