update to do global parsing together