large refactor for multiple block elements