changed the code in the operator overloading for the block input and output