added the initial code for the widget.