add ajax get and post methods