added ajax for buttons