Updated create function.