getting closer to fixing extractToAs, but still needs a little work