limits calculation