Make resSeq an attribute instead of messing with index