write ajax, modify controller