working for I/O

needs write to binary file stuff added