only valid subs are extracted now