first version of command pattern
split into multiple files