added additional checks for parameters passed into GET