cleaning up probe function