adding javascript encoding