refactor key so it can be defined in configuration
uses associative array in case object not array
Merge pull request #4 from dieend/refactor-key

Refactor key