Update xtpl.js

improved version !