simplified ajax loads into one function