Create token function now writes directly to store