refactor with ctx.query

just a little thing i noticed