removed finalize function