update multipole expansion function