very crude export sort of works