move runtime string rendering to a separate view to reduce duplicated
code