factored out block-call generation to make it reusable