use mktemp instead of my method