widget revised, render functions added