still working on last function, started another duplicate check function