BIG ERROR IN BEAD_TRACKING. IMPLEMENTING AVERAGE FOR TOP BEAD