parse blocks