command pattern based functions