Updated extension function

As noted by someone else, split is deprecated so I modified the findexts function