pulled out shitty javascript in view