refactor design helper to not involve view logic