adding code for widgets