original working widgets code