before create master