finish building function tables