add widget related functions