just written the widget class and added the basic functionality