changing to ajax done instead of complete