changed deprecated widget to button and fixed error occurring when [] in name