finished second function, get block size