add retrieve_predicted_head function, implement headpos confusions (to check)