use ajax to load templates