fixed the block mistake, slight refinements