readline method