common widget example code