add buf to reader to improve performance