adding javascript behaviors