minor cleanup
add collision routine for general dimensions