adding translator code
refactored out come code