working out ajax/options stuff