added early Ajax functionality