redisigned code for one binary file