filter gets divided into skip_collisions, visited and filter
refactor
set ti to 1 in touches (instead of math.huge)