sentence level code integrated with gui