refactor putEntry
Merge pull request #2 from AndreMouche/master

Refactor putEntry