Added weight functionality to get_local_ar.c