takes in parameter from query