moves method of finding duplicates to the code field. tested in development and ready? for production