refactor that shit