graph: bucket fill without global variables