loading the js properly but need to write a proper controller