added check constraint and changed filenames