Adding blocks to classes