first impl without reading the command pattern