Added readline function.