correction in optimize3