add lots of ajax functionality