Eliminated unneccesary Sequence.toarray()