some formatting
fix getNextMachine logic