move hr stuff to layout
correctly implement rem, by god.