updated solution w/ command interface