Fix sub requests

use query string parameters to grab only the ones needed from the database in the first place