simplify common.R