adjust block size and mrgins