Update beads.cpp