moved binary to its own file
binary write