put in checks for invalid methods and bad requests