Updated some functions

Updated some functions for widgets