Modified button group to be dynamic