document generator button working