extract some constants to avoid magic numbers