accounting for the fact that multiple buttons may share a label
removing extraneous printing
fixed buggy test