changed calculation of sql users