added let statements and release method