improved document
add head.R which contains common libraries