fix magic numbers