fixed create function