building widget constructor