add ajax, but still has bug