use constant instead of 1000 for rand()