adding category ajax functionality