optimize resolve part to avoid repeat ajax