fixed up item create function