Added code to new widget
working version of new widget