Optimalization of conditions