changed blocking read to elegant solution using cin.get() as opposed to using writing input to string and ignoring