add continuous optimization function