use buffered input stream