wrote mapA and mapB, and renamed snocA and snocB to insA and insB, respectively.