trying to add ajax handling