added read from file functionality (including encoding first line and decoding the rest)