added dupes
added extra input options
tweaked debug
improved debug