added more input parameters to glbopt