before create handler