added ajax call and auto incrementing in proccess