updated to use get and post only, not request