basic Command Pattern implementation