started code to convert files to handles
finished files to handles