use of PQP for the collision check
add some const