starting ajax functionality