Fixed translate function bug | Reworked example