ajax update works well. going to clean up the old code