modified def create