simplify multiple ajax calls to a single self contained method