Hard X-ray emission at the footpoints of solar flares