refactor main: redundant code is redundant, updatePositions
main: dont be random