define readb and readc
add flag for I/O strings
initialise flags to clear
add flags