modified before create method