slight reimplementation and frame tweaks