Base code from lec 24 blocks example