fixed create functionality