fixed all bugs i could find, realized that if i allow x2 to be continuous then the particle stops when it touches the wall. have to fix that somehow