Adding widget functionality.