Modified read and main functions temporarily.