worked on widget functionality