changed 2000 into a constant defined inline