multi-block working (but needs refactoring)