file generate function added