adding some ajax functionality