updated constructor example