corrected create functionality