portfolio query done correctly