added better dup handling and stubed out locations a little