switched to class view + fixed js stupidity