refactor...probably for the worse