refactor again and again