Updated parser to be more efficient

checks sequence size and allocates vector accordingly