remove log and use constant for magic numbers.