using buffer instead of read file