reduced code to integrate widget