code format. extract some const the variables