mmmmmmmm yummy refactor