update __construct method