final function edit