standardized some ajax stuff