using points calculation from query