remove magic numbers 2 and 5.