finish function delete