added before_create hook