attempted to reduce complexity