refractor a bit