refactor to prommise and add widget data