added client side code in tc.rb