added test code for blocks