move the <Machine/> to separate file
use reduce instead of forEach