public JSONObject listFollowings(String email, Integer limit,String order,Integer since_id) {
    JSONObject result = new JSONObject();
    JSONArray response = new JSONArray();
    try {
        StringBuilder querry = new StringBuilder("SELECT id, username, about, name, email, isAnonymous FROM followers JOIN users ON email = followee WHERE follower = ? ");
        if(since_id != null) { querry.append("and id >= ? "); }
        if(order != null && order.equals("asc")) { querry.append("order by name asc "); }
        else { querry.append("order by name desc "); }
        if(limit != null) { querry.append("limit ? "); }

        PreparedStatement stmt = con.prepareStatement(querry.toString());

        Integer arg = 1;
        stmt.setString(arg,email);
        ++arg;
        if(since_id != null) {
            stmt.setInt(arg,since_id);
            ++arg;
        }

        if(limit != null) {
            stmt.setInt(arg,limit);
            ++arg;
        }

        ResultSet user = stmt.executeQuery();

        while (user.next()) {
            JSONObject jsonObject = new JSONObject();

            jsonObject.put("id", user.getInt("id"));

            jsonObject.put("username",user.getString("username"));
            jsonObject.put("about", user.getString("about"));
            jsonObject.put("name", user.getString("name"));
            jsonObject.put("email", user.getString("email"));
            jsonObject.put("isAnonymous", user.getBoolean("isAnonymous"));
            jsonObject.put("followers", getListFollowers(user.getString("email"), con));
            jsonObject.put("following", getListFollowings(user.getString("email"), con));
            jsonObject.put("subscriptions", getListSubscriptions(user.getString("email"),con));

            response.put(jsonObject);
        }
        result.put("code", 0);
        result.put("response", response);
    } catch (SQLException | JSONException e) { e.printStackTrace(); }
    return result;
}