reorganized head.R
extract global_variable.R out