assigning cell ids for areas and nodes