update function __construct