setup the commands array map and calling functions