updates active sections logic