working through chapter 11; added ajax functionality