adding post and get method