move getIdx into common trait
Merge pull request #1 from ryanlecompte/master

Move getIdx to common trait