made the javascript part HAML