Command design pattern implementation