changes to main

unable to find next higher and next lower beads because code is not
iterating through beads