Source: https://www.academia.edu/18443766/Input_and_Output.pdf