begining of widget click code