widget building functionality added