added an identify method

Same as the previous pull request, but with tests