add function to create define