add ajax functionality

ohyeah woops, misread the `()`s as `[]`s