updated untiy files
added unit detection