updated GET and POST methods