improved docsting for optimize