added functionality for widget