beforeafter mod and lib added