move to command pattern (partial commit)