add AFT model;move examples to examples.R; move common functions to common.R