optimization of code
add translate
Merge pull request #6 from ctesniere/add-translate

Add translate