changed filehandle and added specific positions